Skip to content

feat(hooks): Full IntelligenceEngine with MCP tools, trajectory tracking, and attention#92

Merged
ruvnet merged 10 commits intomainfrom
feature/mcp-server
Dec 31, 2025
Merged

feat(hooks): Full IntelligenceEngine with MCP tools, trajectory tracking, and attention#92
ruvnet merged 10 commits intomainfrom
feature/mcp-server

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Dec 30, 2025

Summary

  • IntelligenceEngine: Full RuVector stack integration (VectorDB + SONA + Attention)
  • 22 MCP Tools: Added 11 new tools for trajectory, co-edit, error patterns, and learning control
  • 8 CLI Commands: New trajectory-, coedit-, error-*, force-learn commands
  • Attention Integration: Flash/MultiHead/DotProduct attention for embeddings
  • Enhanced Hooks: Added Read/Glob/Task hooks for pattern learning
  • Bug Fixes: Fixed @ruvector/attention Linux x64 binary, SONA wrapper

New MCP Tools

Tool Purpose
hooks_import Import backup data
hooks_swarm_recommend Agent recommendations
hooks_suggest_context Context suggestions
hooks_trajectory_begin/step/end Trajectory tracking
hooks_coedit_record/suggest Co-edit patterns
hooks_error_record/suggest Error→fix patterns
hooks_force_learn Trigger learning

New CLI Commands

  • trajectory-begin, trajectory-step, trajectory-end
  • coedit-record, coedit-suggest
  • error-record, error-suggest
  • force-learn

Test plan

  • All modules load correctly (core, sona, attention, gnn)
  • MCP server tests pass (22 tools verified)
  • CLI commands work (47 help lines)
  • Published ruvector@0.1.53

🤖 Generated with Claude Code

ruvnet and others added 10 commits December 30, 2025 19:22
- Fixes $schema to correct URL
- Removes invalid Start/End hooks (renamed to SessionStart/Stop)
- Preserves other existing settings when merging

Bumps to v0.1.43

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tation

- Added CLAUDE.md creation to 'hooks init' command
- Includes complete hooks documentation and CLI commands
- Added --no-claude-md flag to skip CLAUDE.md creation
- Respects existing CLAUDE.md unless --force is used
- Add environment variables (RUVECTOR_INTELLIGENCE_ENABLED, LEARNING_RATE, etc.)
- Add permissions configuration (allow/deny lists)
- Add UserPromptSubmit hook for context suggestions
- Add PreCompact hook for preserving context before compaction
- Add Notification hook for event tracking
- Add --minimal flag for basic hooks only
- Add --no-env and --no-permissions flags
- Updated CLAUDE.md template with complete documentation
… init

New commands:
- hooks verify: Check if hooks are working correctly
- hooks doctor: Diagnose and fix setup issues (with --fix)
- hooks export: Export intelligence data for backup
- hooks import: Import intelligence data (with --merge, --dry-run)

Enhanced init:
- Auto-detect project type (Rust, Node, Python, Go, Ruby, Java)
- Project-specific permissions (cargo for Rust, npm for Node, etc.)
- StatusLine configuration with .claude/statusline.sh
- MCP server configuration (claude-flow)
- .gitignore update (adds .ruvector/)
- Creates .ruvector/ directory

New options for init:
- --no-gitignore: Skip .gitignore update
- --no-mcp: Skip MCP server configuration
- --no-statusline: Skip statusLine configuration
New command:
- hooks pretrain: Bootstrap intelligence by analyzing repository
  - Phase 1: Analyze file structure → agent routing patterns
  - Phase 2: Analyze git history → co-edit patterns
  - Phase 3: Create vector memories from key files
  - Phase 4: Build directory-agent mappings

Options:
  --depth <n>: Git history depth (default: 100)
  --workers <n>: Parallel workers (default: 4)
  --skip-git: Skip git history analysis
  --skip-files: Skip file structure analysis
  --verbose: Show detailed progress

Fix:
- Removed fork bomb pattern from deny list (caused validation error)
…nto init

New command:
- hooks build-agents: Generate optimized agent configs based on repo analysis
  - Focus modes: quality, speed, security, testing, fullstack
  - Detects languages (Rust, TypeScript, Python, Go) and frameworks (React, Vue)
  - Generates YAML/JSON/MD agent definitions with system prompts
  - Creates coordinator agent with routing rules
  - Outputs to .claude/agents/

Init enhancements:
- --pretrain: Bootstrap intelligence after init
- --build-agents [focus]: Generate agents after init

Example: npx ruvector hooks init --pretrain --build-agents security
- Intelligence now saves to .ruvector/intelligence.json in project dir
- Falls back to ~/.ruvector/ only if no project context found
- Prefers project-local when .ruvector/ or .claude/ exists
- Fixes verify showing 'will be created' after pretrain
- Added hooks feature summary near top of README.md
- Created comprehensive HOOKS.md documentation
- Links to detailed docs for pretrain, build-agents, verify, etc.
Add Model Context Protocol (MCP) server with stdio transport for
seamless Claude Code integration. Provides 10 self-learning
intelligence tools via JSON-RPC protocol.

New commands:
- `npx ruvector mcp start` - Start MCP server
- `npx ruvector mcp info` - Show setup instructions

MCP Tools:
- hooks_stats - Get intelligence statistics
- hooks_route - Route task to best agent
- hooks_remember - Store context in vector memory
- hooks_recall - Search vector memory semantically
- hooks_init - Initialize hooks in project
- hooks_pretrain - Pretrain from repository
- hooks_build_agents - Generate agent configs
- hooks_verify - Verify hooks configuration
- hooks_doctor - Diagnose setup issues
- hooks_export - Export intelligence data

MCP Resources:
- ruvector://intelligence/stats
- ruvector://intelligence/patterns
- ruvector://intelligence/memories

Setup: claude mcp add ruvector npx ruvector mcp start

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…d attention

- Add IntelligenceEngine class integrating VectorDB, SONA, and Attention
- Add 11 new MCP tools (22 total): trajectory tracking, co-edit patterns,
  error suggestions, swarm recommendations, force learning
- Add 8 new CLI commands: trajectory-begin/step/end, coedit-record/suggest,
  error-record/suggest, force-learn
- Integrate Flash/MultiHead attention for embeddings with fallbacks
- Add Read/Glob/Task hooks to settings.json for pattern learning
- Fix @ruvector/attention-linux-x64-gnu (publish v0.1.3)
- Published ruvector@0.1.53

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ruvnet ruvnet changed the title feat(mcp): add MCP server for Claude Code integration feat(hooks): Full IntelligenceEngine with MCP tools, trajectory tracking, and attention Dec 31, 2025
@ruvnet ruvnet merged commit 23fc783 into main Dec 31, 2025
7 checks passed

| Event | Trigger | RuVector Action |
|-------|---------|-----------------|
| **PreToolUse** | Before Edit/Write/Bash | Agent routing, file analysis, command risk |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

B

ruvnet added a commit that referenced this pull request Feb 20, 2026
feat(hooks): Full IntelligenceEngine with MCP tools, trajectory tracking, and attention
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants